package cn.biplam.common.opcode.sqlengine;

/**
 * DDL转换器操作类转换代码
 * @author XiaoRuxing Sep 24, 20095:37:55 PM
 * @version 1.0
 */
public class DDLParserCode {

	/**
	 * DB2SQL转换规则表数据访问
	 */
	public static class SqlRuleInfoCode{

		public static String Op_Id = "110200";
		/** 根据schema名称和类型ID查找schema */
		public static final String Get_Schema=SqlRuleInfoCode.Op_Id+"01";
		/** 通过Schema_ID查找Class */
		public static final String Get_Class=SqlRuleInfoCode.Op_Id+"02";
		/** 通过Class_id查找Class的初始化参数列表 */
		public static final String Get_Class_Param_Type=SqlRuleInfoCode.Op_Id+"03";
		/** 查询下一步应该运行的schema */
		public static final String Get_Next_Step_Schema=SqlRuleInfoCode.Op_Id+"04";
		/** 通过classId查找方法名 */
		public static final String Get_Method=SqlRuleInfoCode.Op_Id+"05";
		
	}
	
	/**
	 * 数据类型转换规则表操作
	 */
	public static class TypeParserRuleCode{
		public static String Op_Id = "110100";
		/** 根据数据类型名称查询语义模型对应数据类型 */
		public static final String Get_Model_Type=Op_Id+"02";
		/** 根据数据类型的数据长度、精度和名称查询语义模型数据类型 */
		public static final String Get_Model_Type_Detail=Op_Id+"03";
		/** 查询数据类型名称对应默认语义模型数据类型 */
		public static final String Get_Model_Type_Default=Op_Id+"04";
	}
	
	/**
	 * 源数据表缓冲区表数据操作
	 */
	public static class TabBufCode{

		public static String Op_Id = "302202";
		/** 插入源数据表到缓存区 */
		public static final String Insert = Op_Id+"01";
		/** 根据表ID更新源数据表缓存信息 */
		public static final String Update = Op_Id+"02";
		/** 删除缓存区表信息 */
		public static final String Delete = Op_Id+"03";
		/** 根据表ID查询表缓存信息 */
		public static final String Get_By_Table_ID = Op_Id+"04";
		/** 获取当前批次ID下表缓存信息 */
		public static final String Get_By_Batch =Op_Id+"05";
		/** 获取当前批次下指定表名称的表信息 */
		public static final String Get_By_Name = Op_Id+"06";
		/** 删除任务ID下的缓存区表信息 */
		public static final String Delete_By_TaskId = Op_Id+"07";
		
	}
	
	/**
	 * 源数据表字段缓冲区表数据操作
	 */
	public static class TableColBufCode{

		public static String Op_Id = "302201";
		/** 插入源表字段到缓存区 */
		public static final String Insert = Op_Id+"01";
		/** 更新表字段信息 */
		public static final String Update = Op_Id+"02";
		/** 根据字段名、表ID和批次号查询字段信息<br>
		 */
		public static final String Select_By_Column_Name = Op_Id+"03";
		/** 根据表ID和批次号查询字段信息<br>
		 */
		public static final String Select_By_TableID_And_Batch = Op_Id+"04";
		/** 根据列id查询字段信息*/
		public static final String Select_By_ID = Op_Id+"05";
		
	}
	
	/**
	 * 源数据表外键关系缓冲区数据操作
	 */
	public static class FkTabBufCode{
		/** 插入表外键关系到缓存区 */
		public static final String Insert = "30220301";
		/** 查询表外键关系 */
		public static final String Get_By_ID = "30220302";
		/** 根据主键表名和外键表名 查询表外键关系*/
		public static final String Get_By_TaskID_And_MtIdOrFtId = "30220303";
	}
	
	/**
	 * 源数据表外键字段关系缓冲区数据操作
	 */
	public static class FkTabColBufCode{
		/** 插入数源数据表字段外键关系到缓存区 */
		public static final String Insert = "30220401";
		/** 获取外键字段关系 */
		public static final String Get_By_ID = "30220402";
		/** 根据任务ID和表关系id查询表关联字段信息 */
		public static final String Get_By_TaskID_And_ReId = "30220403";
	}
	
	/**
	 * SQL2MD任务管理表数据操作
	 */
	public static class MdImpTskCode{
		public static String Op_Id = "302205";
		/** 创建新任务 */
		public static final String Insert = Op_Id+"01";
		/** 更新任务状态 */
		public static final String Update = Op_Id+"02";
		/** 查询所有任务 */
		public static final String Get_Task_By_ID = Op_Id+"03";
		/** 获取单个任务 */
		public static final String Get_All_Task =Op_Id+"04";
		/** 删除任务 */
		public static final String Delete_By_ID = Op_Id+"05";
	}
	
	/**
	 * Buffer2Md表比较信息操作类
	 */
	public static class BufCompTabCode{
		public static String Op_Id = "110301";
		/** 插入比较表的表信息 */
		public static final String Insert = Op_Id+"01";
		/** 更新比较表的表信息 */
		public static final String Update = Op_Id+"02";
		/** 根据ID查询 */
		public static final String Get_By_ID = Op_Id+"03";
		/** 根据任务ID查询*/
		public static final String Get_By_Task_ID = Op_Id+"04";
		/** 根据任务ID删除*/
		public static final String Delete_By_Task_ID = Op_Id+"05";
		/** 根据任务ID查询*/
		public static final String Get_MaxOrid_By_Task_ID = Op_Id+"06";
		/** 根据任务ID和导入的表名查询*/
		public static final String Get_MaxOrid_By_Task_ID_And_ImpName = Op_Id+"07";
		/** 根据任务ID和操作类型查询*/
		public static final String Get_By_Task_ID_And_OperatorType = Op_Id+"08";
		/** 根据任务ID查询*/
		public static final String Get_All_By_Task_ID = Op_Id+"09";
	}
	
	/**
	 * Buffer2Md表字段比较信息操作类
	 */
	public static class BufCompTabColCode{

		public static String Op_Id = "110302";
		/** 插入比较的表字段信息 */
		public static final String Insert = Op_Id+"01";
		/** 更新比较的表字段信息 */
		public static final String Update = Op_Id+"02";
		/** 根据ID查询 */
		public static final String Get_By_ID = Op_Id+"03";
		/** 根据任务ID查询*/
		public static final String Get_By_Task_ID = Op_Id+"04";
		/** 根据任务ID删除*/
		public static final String Delete_By_Task_ID = Op_Id+"05";
		/** 根据任务ID查询排序序号*/
		public static final String Get_MaxOrid_By_Task_ID = Op_Id+"06";
		/** 根据任务ID和导入的表名查询*/
		public static final String Get_MaxOrid_By_Task_ID_And_ImpName = Op_Id+"07";
		/** 根据对比表ID查询,分页用*/
		public static final String Get_By_CTID = Op_Id+"08";
		/** 根据对比表ID查询 导入列不为空的情况*/
		public static final String Get_By_CTID_All = Op_Id+"09";
		/** 根据对比表ID查询 导入列为空的所有记录*/
		public static final String Get_NullImp_By_CTID = Op_Id+"10";
	}
	
	
}
